---
sidebar_class_name: node-only
---

# Qdrant

[Qdrant](https://qdrant.tech/) is a vector similarity search engine. It provides a production-ready service with a convenient API to store, search, and manage points - vectors with an additional payload.

## Setup

1. Run a Qdrant instance with Docker on your computer by following the [Qdrant setup instructions](https://qdrant.tech/documentation/quick-start/).
2. Install the Qdrant Node.js SDK.

   ```bash npm2yarn
   npm install -S @langchain/qdrant
   ```

3. Setup Env variables for Qdrant before running the code

   ```bash
   export OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE
   export QDRANT_URL=YOUR_QDRANT_URL_HERE # for example http://localhost:6333
   ```

import CodeBlock from "@theme/CodeBlock";

## Usage

### Create a new index from texts

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/openai @langchain/community
```

import TextsExample from "@examples/indexes/vector_stores/qdrant/fromTexts.ts";

<CodeBlock language="typescript">{TextsExample}</CodeBlock>

### Create a new index from docs

import DocsExample from "@examples/indexes/vector_stores/qdrant/fromDocs.ts";

<CodeBlock language="typescript">{DocsExample}</CodeBlock>

### Query docs from existing collection

import ExistingExample from "@examples/indexes/vector_stores/qdrant/fromExisting.ts";

<CodeBlock language="typescript">{ExistingExample}</CodeBlock>
